package cn.ahxb.frame.common.utils;

import android.os.Build;

/**
 * Created by xuyougen on 2018/5/5.
 */

public class DeviceTool {
    public static String getDeviceName() {
        return Build.MODEL;
    }

    public static String getDeviceStorage() {
        long storageSize = SDCardUtils.getInternalTotalSpace() / 1024 / 1024 / 1024;
        if (storageSize > 400) {
            storageSize = 512;
        } else if (storageSize > 200) {
            storageSize = 256;
        } else if (storageSize > 90) {
            storageSize = 128;
        } else if (storageSize > 42) {
            storageSize = 64;
        } else if (storageSize > 18) {
            storageSize = 32;
        } else if (storageSize > 9) {
            storageSize = 16;
        } else if (storageSize > 4) {
            storageSize = 8;
        } else {
            storageSize = 4;
        }
        return storageSize + "G";
    }


}
